/**
 * 
 */
package org.softTank.BC.data;

import java.util.ArrayList;
import java.util.List;

import org.softTank.BC.entity.services.Category;
import org.softTank.BC.entity.services.PartnerLinkType;
import org.springside.modules.test.DataUtils;

/**
 * @author Yuzone
 * 
 */
public class CategoryData {

	public static Category getRandomCategory() {
		Category category = new Category();
		category.setName(DataUtils.randomName("category"));
		category.setDescription("description: ");
		category.setKey(DataUtils.randomName("key"));

		return category;
	}

	public static Category getRandomCategoryWithPartnerLinkType() {
		Category category = getRandomCategory();
		PartnerLinkType p = new PartnerLinkType();
		p.setId(1L);
		List<PartnerLinkType> l = new ArrayList<PartnerLinkType>();
		l.add(p);
		category.setPartnerLinkTypeList(l);

		return category;
	}

	public static Category getTestCategory() {
		Category cate = getRandomCategory();
		cate.setName("name");
		cate.setId(1L);

		return cate;
	}

	public static Category getCategoryWithInferiors() {
		Category category = getRandomCategory();
		category.setId(1L);
		category.setKey("key");
		List<PartnerLinkType> l = new ArrayList<PartnerLinkType>();
		l.add(PartnerLinkTypeData.getPLTWithInferiors());
		category.setPartnerLinkTypeList(l);

		return category;
	}
}
